<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="/fuman/js/order.js"></script>
<title>订单信息</title>

<body class="withvernav">
<div class="bodywrapper">
{{include file='/public/leftmenu.tpl'}}
<div class="centercontent">
<div class="pageheader notab">
  <h1 class="pagetitle"> 订单信息</h1>
  <div class="menulist">
    <ul class="profile_summary">
    </ul>
  </div>
</div>
<!--pageheader-->

<div id="contentwrapper" class="contentwrapper">
<div id="basicform" class="subcontent">
<form class="stdform stdform2"  id="editForm" method="post" action="/orderlist/saveorder">
  <input type="hidden" name="orderId" value="{{$detail.order_id}}">
  <div class="x_content" style="overflow-x:auto;">
  <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
    <thead>
      <tr>
        <th colspan="2" class="head1">基础信息</th>
      </tr>
    </thead>
  </table>
  <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
    <tbody>
      <tr>
        <td class="head1" bgcolor="#FFFFFF">订单号</td>
        <td class="head0" bgcolor="#FFFFFF">{{$detail.order_sn}}</td>
        <td class="head0" bgcolor="#FFFFFF">交易号</td>
        <td class="head1" bgcolor="#FFFFFF">{{$detail.tradeid}}</td>
      </tr>
      <tr>
        <td class="head1" width="120" bgcolor="#FFFFFF">来源店铺</td>
        <td class="head0" bgcolor="#FFFFFF">{{$detail.shopname}}</td>
        <td class="head0" width="120" bgcolor="#FFFFFF">负责人</td>
        <td class="head1" bgcolor="#FFFFFF">{{$detail.shopoper}}</td>
      </tr>
      <tr>
        <td class="head1" bgcolor="#FFFFFF">订单状态</td>
        <td class="head0" bgcolor="#FFFFFF"> {{$detail.statustext}} </td>
        <td class="head0" bgcolor="#FFFFFF" width="120">订单属性</td>
        <td class="head1" bgcolor="#FFFFFF">{{$detail.order_source}}</td>
      </tr>
      <tr>
        <td class="head1" bgcolor="#FFFFFF">国家:</td>
        <td class="head0" bgcolor="#FFFFFF">{{$detail.country}}  &nbsp;({{$detail.country_cn}})</td>
        <td class="head0" width="120" bgcolor="#FFFFFF">货币</td>
        <td class="head1" bgcolor="#FFFFFF">
        {{if $detail.moneytype == '请选择' || $detail.moneytype==''}}
        <select name="moneytype" id="moneytypes" required  onBlur="showmonetytype()" required >
            <option value="">请选择</option>
          {{foreach item=li from=$moneyratelist key=key}}
          <option value="{{$li.name}}" {{if $detail.moneytype==$li.name}} selected{{/if}}>{{$li.name}}</option>
          {{/foreach}}
          </select>
        {{else}}
        {{$detail.moneytype}}
        {{/if}}
        </td>
      </tr>
        <tr>
        <td class="head1" bgcolor="#FFFFFF">买家帐号:</td>
        <td class="head0" bgcolor="#FFFFFF">
        
        
        {{if $detail.platformID==1 || $detail.customerid==''}}
        <input type="text" id="customerid" name="customerid" style="border-style: solid;  border-width: 0;" value="{{$detail.customerid}}"/>
        {{else}}
        <input type="hidden" id="customerid" name="customerid" style="border-style: solid;  border-width: 0;" value="{{$detail.customerid}}"/>
        {{$detail.customerid}}
        {{/if}}
        </td>
        <td class="head0" width="120" bgcolor="#FFFFFF">状态</td>
        <td class="head1" bgcolor="#FFFFFF">
  
  
  
   {{if $detail.is_nodelivery==0}}
      <img title="可发货" src="/fuman/images/icons/g_cross_circle.png" alt="" width="16" height="16">
      {{/if}}
      {{if $detail.is_nodelivery==1}}
      <img title="禁止发货" src="/fuman/images/icons/cross_circle.png" alt="" width="16" height="16">
     {{/if}}
     
     
      {{if $detail.is_que==1}} 
      <img title="缺货" src="/fuman/images/icons/alertflag.png" alt="">
      {{/if}}
      {{if $detail.is_que==2}} 
      <img title="不缺货" src="/fuman/images/icons/g_alertflag.png" alt="">
      {{/if}}
   	{{if $detail.is_overweight==1}}
    <img title="超重" src="/fuman/images/icons/orderweight.png" alt="">
    {{/if}}
   {{if $detail.is_overweight==2}}
   <img title="不超重" src="/fuman/images/icons/g_orderweight.png" alt="">
   {{/if}}
   
   
    <img src="/fuman/images/icons/g_mail.png" title="无买家Message信息" border="0"> 
    
    
    {{if $detail.platform_message}}
    <img  src="/fuman/images/icons/ebaynote.png" title="{{$li.platform_message}}"> 
    {{else}}
    <img title="无平台留言" src="/fuman/images/icons/g_ebaynote.png" alt=""> 
    {{/if}}
    
    
    {{if $detail.remark}}
    <img src="/fuman/images/icons/content.png" title="{{$li.remark}}">
    {{else}}
    <img title="无备注" src="/fuman/images/icons/g_content.png" alt="">
    {{/if}}
  
  
  
  	</td>
          </td>
      </tr>
      <tr>
        <td class="head1" bgcolor="#FFFFFF">客户信息
          <input type="button" value="复制"  onClick="getCustomerInfo()"/></td>
        <td class="head0" colspan="3" bgcolor="#FFFFFF"><div style="border:0px #000 solid;width:100%;background:#fff;"> <span style="margin-left: 10px;margin-top:5px;">Name：</span> <span style="margin-left:54px;">
            <input type="text" id="consignee" name="consignee" style="border-style: solid;  border-width: 0;" value="{{$detail.consignee}}"/>
            </span><br>
            {{if $detail.address}}
            <span style="margin-left: 10px">Address：</span> <span style="margin-left:38px;">
            <input type="text" id="address" name="address" style="border-style: solid;  border-width: 0;" value="{{$detail.address}}"/>
            </span>
            
            {{/if}}
            {{if $detail.address2}}
            <br>
            <span style="margin-left: 10px">Address2：</span> <span style="margin-left:26px;">
            <input type="text" id="address2" name="address2" style="border-style: solid;  border-width: 0;" value="{{$detail.address2}}"/>
            </span>
            {{/if}}
            {{if $detail.address=='' && $detail.address2==''}}
             <span style="margin-left: 10px">Address：</span> <span style="margin-left:38px;">
                <input type="text" id="address" name="address" style="border-style: solid;  border-width: 0;" value="{{$detail.address}}"/>
                </span>
            {{/if}}
            <br>
            <span style="margin-left: 10px">City：</span><span style="margin-left:66px;">
            <input type="text" id="city" name="city" style="border-style: solid;  border-width: 0;" value="{{$detail.city}}"/>
            </span><br>
            <span style="margin-left: 10px">State：</span><span style="margin-left:57px;">
            <input type="text" id="province" name="province" style="border-style: solid;  border-width: 0;" value="{{$detail.province}}"/>
            </span><br>
            <span style="margin-left: 10px">Country：</span><span style="margin-left:40px;">
        <input type="text" id="country" name="country" style="border-style: solid;  border-width: 0;" value="{{$detail.country}}" onChange="selectcountry('{{$detail.country}}')"/>
            
          <!--   <select name="country"  id="country"  class="selection select2_group" style="width:200px;" >
                <option value="" >国家</option>
        {{foreach from=$d_country item=li key=key}}
                <option value="{{$li.countrynamecn}}" {{if $detail.country==$li.countrynamecn}}selected{{/if}}>{{$li.countrynamecn}}</option>
        {{/foreach}}
              </select>-->
            
            </span><br>
            <span style="margin-left: 10px">Post code：</span><span style="margin-left:27px;">
            <input type="text" id="zipcode" name="zipcode" style="border-style: solid;  border-width: 0;" value="{{$detail.zipcode}}"/>
            </span><br>
            <span style="margin-left: 10px">Tel1：</span><span style="margin-left:62px;">
            <input type="text" id="tel" name="tel" style="border-style: solid;  border-width: 0;" value="{{$detail.tel}}" />
            </span><br>
            <span style="margin-left: 10px">Tel2：</span><span style="margin-left:62px;">
            <input type="text" id="mobile" name="mobile" style="border-style: solid;  border-width: 0;" value="{{$detail.mobile}}" />
            </span><br>
            <span style="margin-left: 10px">E-mail：</span><span style="margin-left:51px;">
            <input type="text" id="email" name="email" style="border-style: solid;  border-width: 0;" value="{{$detail.email}}"/>
            </span> </div></td>
      </tr>
      
    
      
      {{if $detail.payid}}
      <tr>
        <td class="head1" bgcolor="#FFFFFF">收款ID</td>
        <td class="head0" bgcolor="#FFFFFF"><input type="text" id="payid" name="payid" style="border-style: solid;  border-width: 0;" value="{{$detail.payid}}"/></td>
        <td class="head0" bgcolor="#FFFFFF">收款帐户</td>
        <td class="head1" bgcolor="#FFFFFF"><input type="text" id="payaccount" name="payaccount" style="border-style: solid;  border-width: 0;" value="{{$detail.payaccount}}"/></td>
      </tr>
      {{/if}}
      <tr>
        <td class="head1" bgcolor="#FFFFFF">物流方式:</td>
        <td class="head0" bgcolor="#FFFFFF">
             <select name="shipping" id="shipping"  class="selection select2_group" style="width:150px;" >
        <option value="" >请选择</option>
        {{foreach from=$orderexpress item=li key=key}}
              <option value="{{$li.id}}" {{if $detail.shipping_id==$li.id}} selected{{/if}}>{{$li.name}}</option>
        {{/foreach}}
        </select>
        </td>
        <td class="head0" width="120" bgcolor="#FFFFFF">称重重量</td>
        <td class="head1" bgcolor="#FFFFFF"><input name="actionorderweight" style="line-height:0.4;" class="widht200" value="{{$detail.actionorderweight}}" type="text"></td>
      </tr>
      <tr>
        <td class="head1" bgcolor="#FFFFFF"><span class="head0">运单号</span></td>
        <td class="head0" bgcolor="#FFFFFF"><input name="shipping_number"  class="widht200" value="{{$detail.shipping_number}}"  type="text"></td>
        <td class="head0" width="120" bgcolor="#FFFFFF">真实物流费</td>
        <td class="head1" bgcolor="#FFFFFF"><input name="shipping_realfee"  class="widht200" value="{{$detail.shipping_realfee}}"  type="text"></td>
      </tr>
      <tr>
        <td class="head1" bgcolor="#FFFFFF">预估重量:</td>
        <td class="head0" bgcolor="#FFFFFF"><input name="orderweight"  class="widht200" value="{{$detail.orderweight}}"  type="text"></td>
        <td class="head0" width="120" bgcolor="#FFFFFF">预估物流费</td>
        <td class="head1" bgcolor="#FFFFFF"><input name="shipping_expectfee"  class="widht200" value="{{$detail.shipping_expectfee}}"  type="text"></td>
      </tr>
      <tr>
        <td class="head1" bgcolor="#FFFFFF">平台留言</td>
        <td class="head0" colspan="3" bgcolor="#FFFFFF">
        <textarea name="platform_message" rows="4" cols="110" class="full_input" readonly>{{$detail.platform_message}}</textarea>
        </td>
      </tr>
      <tr>
        <td class="head1" bgcolor="#FFFFFF">备注信息</td>
        <td class="head0" colspan="3" bgcolor="#FFFFFF">
        <textarea name="remark" rows="4" cols="110" class="full_input">{{$detail.remark}}</textarea>
        </td>
      </tr>
       {{if $detail.postageservice}}
      <tr>
        <td class="head1" bgcolor="#FFFFFF">自选物流</td>
        <td class="head0" bgcolor="#FFFFFF" colspan="3">{{$detail.postageservice}}</td>
      </tr>
      {{/if}}
    </tbody>
  </table>
  </div>
  <br>
   <div class="x_content" style="overflow-x:auto;">
  <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
    <thead>
      <tr>
        <td bgcolor="#FFFFFF"><button type="button" onClick="javascript:window.location.href='/orderlist/orderlist'" class="stdbtn btn_red" > 返回列表 </button>
        
          <button type="button" onClick="saveorderform()" class="stdbtn btn_black" > 修改订单 </button>
          
           {{if $isyesstatus==1}}
           		{{if $isyesstatushaltgoods==1}}
                	订单包含停售商品
                {{else}}
          			<button type="button" onClick="YesOrderData({{$detail.order_id}})" class="btn btn-primary" >生成正式订单 </button>
           		{{/if}}
             <button type="button" onClick="changorderstatus('order_status',{{$detail.order_id}},6)" class="stdbtn btn_black" >作废 </button>
             {{if $detail.paypalback==1 && $detail.is_backpay==0}}
          <button type="button" onClick="paypalrefund({{$detail.order_id}},'{{$detail.order_sn}}','{{$detail.moneytype}}','{{$detail.alloriginsale}}')" class="stdbtn btn_black" >Paypal退款 </button>
      {{/if}}
      {{if $detail.order_source=="部分退款"}}
         <button type="button" onClick="paypalrefund({{$detail.order_id}},'{{$detail.order_sn}}','{{$detail.moneytype}}','{{$detail.alloriginsale}}')" class="stdbtn btn_black" >Paypal退款 </button>
      {{/if}}
       {{if $detail.paypalback==1 && $detail.is_backpay==1 && $detail.order_source=="全额退款"}}
    	  <!--<button type="button" onClick="changorderstatus('is_backpay',{{$detail.order_id}},0)" class="stdbtn btn_black" >取消Paypal退款 </button>-->
        <button type="button" class="stdbtn " disabled >已申请Paypal退款 </button>
      {{/if}}
      	   {{else}}
          
          
          
     {{if $detail.is_nodelivery==0 && $detail.order_status !=6 && $detail.order_status !=5 &&  $detail.order_status !=4}}
      <button type="button" onClick="changorderstatus('is_nodelivery',{{$detail.order_id}},1)" class="stdbtn btn_black" >禁止发货 </button>
      {{/if}}
      {{if $detail.is_nodelivery==1}}
      <button type="button" onClick="changorderstatus('is_nodelivery',{{$detail.order_id}},0)" class="stdbtn btn_black" >取消禁止发货 </button>
     {{/if}}
          
          
      {{if $detail.order_status==1 || $detail.order_status==2 || $detail.order_status==3 || $detail.order_status==7}}
      <button type="button" onClick="changorderstatus('order_status',{{$detail.order_id}},6)" class="stdbtn btn_black" >作废 </button>
      {{/if}}
      
      {{if $detail.paypalback==1 && $detail.is_backpay==0}}
          <button type="button" onClick="paypalrefund({{$detail.order_id}},'{{$detail.order_sn}}','{{$detail.moneytype}}','{{$detail.alloriginsale}}')" class="stdbtn btn_black" >Paypal退款 </button>
      {{/if}}
      {{if $detail.order_source=="部分退款"}}
         <button type="button" onClick="paypalrefund({{$detail.order_id}},'{{$detail.order_sn}}','{{$detail.moneytype}}','{{$detail.alloriginsale}}')" class="stdbtn btn_black" >Paypal退款 </button>
      {{/if}}
       {{if $detail.paypalback==1 && $detail.is_backpay==1 && $detail.order_source=="全额退款"}}
    	  <!--<button type="button" onClick="changorderstatus('is_backpay',{{$detail.order_id}},0)" class="stdbtn btn_black" >取消Paypal退款 </button>-->
        <button type="button" class="stdbtn " disabled >已申请Paypal退款 </button>
      {{/if}}
      
      {{if $detail.order_status==6}}
      <button type="button" onClick="changorderstatus('order_status',{{$detail.order_id}},1)" class="stdbtn btn_black" >取消作废 </button>
      {{/if}}
          
          {{if $detail.order_status==1}}
          	<button type="button" onClick="changorderstatus('order_status',{{$detail.order_id}},2)" class="stdbtn btn_red" >收款 </button>
          {{/if}}
          
          <button type="button" onClick="window.self.location.href='/orderlist/addorder?copyid={{$detail.order_sn}}&replay=1'"  {{if $detail.order_status !=5}} class="stdbtn " disabled {{else}}class="stdbtn btn_black"{{/if}} >重发 </button>
        
          <button type="button" onClick="window.self.location.href='/orderlist/addorder?copyid={{$detail.order_sn}}'" class="stdbtn btn_black" >复制订单 </button>
          
          
          
         
           <button type="button" onClick="changorderstatus('order_status',{{$detail.order_id}},3)" class="stdbtn btn_black" >标配货 </button>
           {{/if}} 
           
           {{if $isyesstatushaltgoods==1}}
           	 <br><br>订单包含停售商品说明: <br> 1、停售状态的商品要求销量平台不再销售，由于未即时从平台下架而产生订单；订单只能做 换货或者作废 操作。同时平台请下架商品。
              <br><font color="#FF0000">2、系统测试期间，遇到一直正常出单却标了停售状态的商品，请即时联系技术人员修改商品状态。</font>
           {{/if}}
           </td>
      </tr>
    </thead>
  </table>
  </div>
  <br>
   <div class="x_content" style="overflow-x:auto;">
  <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
    <thead>
      <tr>
        <th colspan="2" class="head1">订单报表</th>
      </tr>
    </thead>
  </table>
  <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
    <thead>
      <tr>
        <th class="head1">结账信息</th>
        <th class="head1">结算汇率</th>
        <th class="head1">商品金额</th>
        <th class="head1 right">运费收入</th>
        <th class="head1 right">平台交易费</th>
        <th class="head1 right">付款交易费</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td valign="middle">收款货币({{$detail.moneytype}})</td>
        <td>{{$detail.moneytype}} {{$detail.moneyrate}}</td>
        <td>{{$detail.moneytype}} {{$detail.goods_originask}}</td>
        <td >{{$detail.moneytype}} {{$detail.shipping_originask}}</td>
        <td >{{$detail.moneytype}} {{$detail.platform_originfee}}</td>
        <td >{{$detail.moneytype}} {{$detail.pay_originfee}}</td>
      </tr>
      <tr>
        <td valign="middle">结算人民币(RMB)</td>
        <td>RMB {{$detail.moneyrate}}</td>
        <td>RMB {{$detail.goods_amount}}</td>
        <td >RMB 
       		 {{if $detail.order_status==2 || $detail.order_status==3}}
           {{$detail.shipping_fee}}
            <span style="cursor:pointer" style="width:100px;" onClick="listTable.edit(this, 'changshippingfee','{{$detail.order_id}}','{{$detail.shipping_fee}}')"> <font color="#FF0000">修改</font></span>
            {{else}}
        	{{$detail.shipping_fee}}
            {{/if}}
        </td>
        <td >RMB {{$detail.platform_fee}}</td>
        <td >RMB {{$detail.pay_fee}}</td>
      </tr>
    <tfoot>
      <tr>
        <th class="head1"></th>
        <th class="head1"></th>
        <th class="head1 right">总计收入 {{$detail.allsale}}</th>
        <th class="head1 right"> 商品成本 {{$detail.allcostprice}} </th>
        <th class="head1 right"> 物流成本 {{if !$detail.shipping_realfee}}  {{$detail.shipping_expectfee}}{{else}}{{$detail.shipping_realfee}}{{/if}}</th>
        <th class="head1 right"> 毛利 {{$detail.allmoney}} </th>
      </tr>
    </tfoot>
    </tbody>
    
  </table>
  </div>
  <br>
   <div class="x_content" style="overflow-x:auto;">
  <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
    <thead>
      <tr>
        <th class="head1"><div style="float:left">订单详情</div><div style="text-align:right">合计商品数量[{{$detail.allgoods_number}}]</div></th>
      </tr>
    </thead>
  </table>
  <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
    <thead>
      <tr>
        <th class="head1">序号</th>
        <th class="head0">图片</th>
        <th class="head1" width="30%">商品编号</th>
        <th class="head0" width="20%">留言</th>
        <th class="head1 right">数量</th>
        <th class="head0 right">销售价</th>
        <th class="head1 right">总售价</th>
        <th class="head0 right">成本</th>
        <th class="head0 right">原始售价</th>
        <th class="head1 right" width="15%">库存信息</th>
      </tr>
    </thead>
  
    
    {{foreach from=$goodslist item=li key=key}}
    <tr>
      <td valign="middle" style="position:relative;"><input name="ppid[]" type="checkbox" class="none" id="ppid[]" value="{{$li.rec_id}}"></td>
      <td valign="middle" style="position:relative;">{{if $li.local_url}} <a href="/{{$li.local_url}}" target="_blank"><img src="{{$li.thumb_url}}" height="60"></a>{{else}}<img src="{{$li.thumb_url}}" height="60">{{/if}}
        {{if $li.itemUrl}}<br><a href="{{$li.itemUrl}}" target="_blank"><img src="/fuman/images/ckk.png"></a>{{/if}}
      </td>
      <td>
      {{if $li.yz==1}}
      	<font color="red"><B>【产品已删除】</B></font>
      {{else}}
      {{if $li.g_sale_status==5}}<font color="red"><B>【清仓】</B></font>{{/if}}
      {{if $li.g_sale_status==4}}<font color="Blue"><B>【停售(平台永久下架)】</B></font>{{/if}}
      {{if $li.g_sale_status==7}}<font color="Blue"><B>【下架】</B></font>{{/if}}
      {{if $li.g_sale_status==6}}<font color="Blue"><B>【暂停销售】</B></font>{{/if}}
      {{/if}}
      {{$li.goods_name}}<br>
       {{if $li.goods_id==0}}
         <font color="#6666FF">{{$li.goods_sn}}</font> <br>
       {{else}}
        
        
        <a href="/product/showproduct?sku={{$li.goods_sn}}" target="_blank"><font color="#6666FF">{{$li.goods_sn}}</font></a> <br>
       {{/if}}
        {{if $detail.order_status==1 || $detail.order_status==2 || $detail.order_status==3 || $isyesstatushaltgoods==1}}
        <span style="cursor:pointer" onClick="listTable.edit(this, 'changgoodsno','{{$li.rec_id}}','{{$li.goods_sn}}')"><font color="#FF0000">更换商品</font></span>
        {{/if}}
        
        {{if $li.goods_id==0}}
         <span  style="cursor:pointer" onClick="listTable.edit(this, 'changgoodsno','{{$li.rec_id}}','{{$li.goods_sn}}')"><font color="#FF0000">更换商品</font></span>
         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
         <span  style="cursor:pointer" onClick="addnewgoods('{{$li.goods_sn}}')"><font color="#FF0000">添加新的商品</font></span>
           
        {{/if}}
      
         </td>
      <td> 
     
      {{if $li.isshow_shoes_custom==1}}
       <!--鞋子选择尺码或者定制 可以系统设置中关闭-->
        <select name="varcha{{$li.rec_id}}" id="varcha{{$li.rec_id}}" class="selection" style="width:60px;" onChange="showshoeschima({{$li.rec_id}})">
            <option value="0" >类型</option>
            <option value="1" {{if $li.sellassist.varcha1==1}}selected{{/if}}>均码</option>
            <option value="2" {{if $li.sellassist.varcha1==2}}selected{{/if}}>定制</option>
        </select>
        
        <span id="chimacustom1{{$li.rec_id}}"  {{if $li.sellassist.varcha1==1 && $li.sellassist.types==1}} {{else}}style="display:none"{{/if}}>
         <select class="full_input" name="varcha2{{$li.rec_id}}" id="varcha2{{$li.rec_id}}" onChange="saveshoesSize({{$li.rec_id}},{{$detail.order_id}})">
            <option value="0" selected>尺寸</option>
            <option value="女码34码(美码4)(22.0cm)" {{if $li.sellassist.varcha2=='女码34码(美码4)(22.0cm)'}} selected{{/if}}>女码34码(美码4)(22.0cm)</option>
            <option value="女码35码(美码4.5/5)(22.5cm)" {{if $li.sellassist.varcha2=='女码35码(美码4.5/5)(22.5cm)'}} selected{{/if}}>女码35码(美码4.5/5)(22.5cm)</option>
            <option value="女码36码(美码5.5)(23.0cm)" {{if $li.sellassist.varcha2=='女码36码(美码5.5)(23.0cm)'}} selected{{/if}}>女码36码(美码5.5)(23.0cm)</option>
            <option value="女码37码(美码6)(23.5cm)" {{if $li.sellassist.varcha2=='女码37码(美码6)(23.5cm)'}} selected{{/if}}>女码37码(美码6)(23.5cm)</option>
            <option value="女码38码(美码6.5/7)(24.0cm)" {{if $li.sellassist.varcha2=='女码38码(美码6.5/7)(24.0cm)'}} selected{{/if}}>女码38码(美码6.5/7)(24.0cm)</option>
            <option value="女码39码(美码7.5)(24.5cm)" {{if $li.sellassist.varcha2=='女码39码(美码7.5)(24.5cm)'}} selected{{/if}}>女码39码(美码7.5)(24.5cm)</option>
            <option value="女码40码(美码8/8.5)(25.0cm)" {{if $li.sellassist.varcha2=='女码40码(美码8/8.5)(25.0cm)'}} selected{{/if}}>女码40码(美码8/8.5)(25.0cm)</option>
            <option value="女码41码(美码9)(25.5cm)" {{if $li.sellassist.varcha2=='女码41码(美码9)(25.5cm)'}} selected{{/if}}>女码41码(美码9)(25.5cm)</option>
            <option value="女码42码(美码9.5/10)(26.0cm)" {{if $li.sellassist.varcha2=='女码42码(美码9.5/10)(26.0cm)'}} selected{{/if}}>女码42码(美码9.5/10)(26.0cm)</option>
            <option value="女码43码(美码10.5)(26.5cm)" {{if $li.sellassist.varcha2=='女码43码(美码10.5)(26.5cm)'}} selected{{/if}}>女码43码(美码10.5)(26.5cm)</option>
            <option value="女码44码(美码11/11.5)(27.0cm)" {{if $li.sellassist.varcha2=='女码44码(美码11/11.5)(27.0cm)'}} selected{{/if}}>女码44码(美码11/11.5)(27.0cm)</option>
            <option value="男码34码(美码3)(22.0cm)" {{if $li.sellassist.varcha2=='男码34码(美码3)(22.0cm)'}} selected{{/if}}>男码34码(美码3)(22.0cm)</option>
            <option value="男码35码(美码3.5)(22.5cm)" {{if $li.sellassist.varcha2=='男码35码(美码3.5)(22.5cm)'}} selected{{/if}}>男码35码(美码3.5)(22.5cm)</option>
            <option value="男码36码(美码4)(23.0cm)" {{if $li.sellassist.varcha2=='男码36码(美码4)(23.0cm)'}} selected{{/if}}>男码36码(美码4)(23.0cm)</option>
            <option value="男码37码(美码4.5)(23.5cm)" {{if $li.sellassist.varcha2=='男码37码(美码4.5)(23.5cm)'}} selected{{/if}}>男码37码(美码4.5)(23.5cm)</option>
            <option value="男码38码(美码5)(23.5cm)" {{if $li.sellassist.varcha2=='男码38码(美码5)(23.5cm)'}} selected{{/if}}>男码38码(美码5)(23.5cm)</option>
            <option value="男码39码(美码5.5)(24.0cm)" {{if $li.sellassist.varcha2=='男码39码(美码5.5)(24.0cm)'}} selected{{/if}}>男码39码(美码5.5)(24.0cm)</option>
            <option value="男码40码(美码6/6.5)(24.5cm)" {{if $li.sellassist.varcha2=='男码40码(美码6/6.5)(24.5cm)'}} selected{{/if}}>男码40码(美码6/6.5)(24.5cm)</option>
            <option value="男码41码(美码7)(25.0cm)" {{if $li.sellassist.varcha2=='男码41码(美码7)(25.0cm)'}} selected{{/if}}>男码41码(美码7)(25.0cm)</option>
            <option value="男码42码(美码7.5/8)(25.5cm)" {{if $li.sellassist.varcha2=='男码42码(美码7.5/8)(25.5cm)'}} selected{{/if}}>男码42码(美码7.5/8)(25.5cm)</option>
            <option value="男码43码(美码8.5)(26.0cm)" {{if $li.sellassist.varcha2=='男码43码(美码8.5)(26.0cm)'}} selected{{/if}}>男码43码(美码8.5)(26.0cm)</option>
            <option value="男码44码(美码9/9.5)(26.5cm)" {{if $li.sellassist.varcha2=='男码44码(美码9/9.5)(26.5cm)'}} selected{{/if}}>男码44码(美码9/9.5)(26.5cm)</option>
            <option value="男码45码(美码10/10.5)(27.0cm)" {{if $li.sellassist.varcha2=='男码45码(美码10/10.5)(27.0cm)'}} selected{{/if}}>男码45码(美码10/10.5)(27.0cm)</option>
            <option value="男码46码(美码11)(27.5cm)" {{if $li.sellassist.varcha2=='男码46码(美码11)(27.5cm)'}} selected{{/if}}>男码46码(美码11)(27.5cm)</option>
            <option value="男码47码(美码11.5/12)(28.0cm)" {{if $li.sellassist.varcha2=='男码47码(美码11.5/12)(28.0cm)'}} selected{{/if}}>男码47码(美码11.5/12)(28.0cm)</option>
            <option value="男码48码(美码12.5/13)(28.5cm)" {{if $li.sellassist.varcha2=='男码48码(美码12.5/13)(28.5cm)'}} selected{{/if}}>男码48码(美码12.5/13)(28.5cm)</option>
        </select>
        </span>
         <span id="chimacustom2{{$li.rec_id}}"  {{if $li.sellassist.varcha1==2 && $li.sellassist.types==1}} {{else}}style="display:none"{{/if}}>
          <br>
          <select class="selection" name="varcha11{{$li.rec_id}}" id="varcha11{{$li.rec_id}}" style="width:90px;" onChange="saveshosecustom('dw',{{$li.rec_id}},{{$detail.order_id}})">
						  <option value="cm" {{if $li.sellassist.varcha11=='cm'}}selected{{/if}}>-cm-</option>
						  <option value="inch" {{if $li.sellassist.varcha11=='inch'}}selected{{/if}}>-inch-</option>
                        </select>
                        
                     <select class="full_input" id="varcha3{{$li.rec_id}}" name="varcha3{{$li.rec_id}}" onChange="saveshosecustom('gender',{{$li.rec_id}},{{$detail.order_id}})" style="width:90px;">
                      <option value="0" selected>-性别-</option>
                      <option value="男" {{if $li.sellassist.varcha3=='男'}} selected{{/if}}>-男-</option>
                      <option value="女" {{if $li.sellassist.varcha3=='女'}} selected{{/if}}>-女-</option>
                    </select>
                    <input type="text" name="varcha4{{$li.rec_id}}"  id="varcha4{{$li.rec_id}}" placeholder="鞋码(必填)" onChange="saveshosecustom('varcha4',{{$li.rec_id}},{{$detail.order_id}})" style="width:80px;" value="{{$li.sellassist.varcha4}}">
                 <br>
                  <input type="text" name="varcha5{{$li.rec_id}}"  id="varcha5{{$li.rec_id}}" value="{{$li.sellassist.varcha5}}" placeholder="脚长" style="width:80px;" onChange="saveshosecustom('varcha5',{{$li.rec_id}},{{$detail.order_id}})">
                  <input type="text" name="varcha6{{$li.rec_id}}"  id="varcha6{{$li.rec_id}}" value="{{$li.sellassist.varcha6}}" placeholder="脚宽" style="width:80px;" onChange="saveshosecustom('varcha6',{{$li.rec_id}},{{$detail.order_id}})">
                  <input type="text" name="varcha7{{$li.rec_id}}"  id="varcha7{{$li.rec_id}}" value="{{$li.sellassist.varcha7}}" placeholder="脚围" style="width:80px;" onChange="saveshosecustom('varcha7',{{$li.rec_id}},{{$detail.order_id}})">
                  <input type="text" name="varcha8{{$li.rec_id}}"  id="varcha8{{$li.rec_id}}" value="{{$li.sellassist.varcha8}}" placeholder="小腿围" style="width:80px;" onChange="saveshosecustom('varcha8',{{$li.rec_id}},{{$detail.order_id}})">
                  <input type="text" name="varcha9{{$li.rec_id}}"  id="varcha9{{$li.rec_id}}" value="{{$li.sellassist.varcha9}}" placeholder="大腿围" style="width:80px;" onChange="saveshosecustom('varcha9',{{$li.rec_id}},{{$detail.order_id}})">
                  <input type="text" name="varcha10{{$li.rec_id}}"  id="varcha10{{$li.rec_id}}" value="{{$li.sellassist.varcha10}}" placeholder="筒高" style="width:80px;" onChange="saveshosecustom('varcha10',{{$li.rec_id}},{{$detail.order_id}})">
         </span>
        <br>
        <!--鞋子选择尺码或者定制结束，可以系统设置中关闭-->
      {{else}}
      
      <span style="cursor:pointer" onClick="listTable.edit(this, 'changmessage','{{$li.rec_id}}','{{$li.sale_remark}}')">{{if $li.sale_remark}}{{$li.sale_remark}}{{else}}编辑留言{{/if}}</span>
      {{/if}}
      </td>
      <td >{{$li.goods_number}}</td>
      <td >{{$li.goods_price}}</td>
      <td >{{$li.goods_amount}}</td>
      <td >
      {{if $li.goods_id}}
      	{{if $li.costprice=='0.00' || $li.costprice=='0' || !$li.costprice}}
            <span style="cursor:pointer" onClick="listTable.edit(this, 'changgoodsprice','{{$li.rec_id}}','{{$li.costprice}}')"><font color="#FF0000">修改成本</font></span>
        {{else}}
        	{{if $detail.order_status==2 || $detail.order_status==3}}
            {{$li.costprice}}
           <!-- <span style="cursor:pointer" onClick="listTable.edit(this, 'changgoodsprice','{{$li.rec_id}}','{{$li.costprice}}')"><br><font color="#FF0000">修改</font></span>-->
           		
            {{else}}
        		{{$li.costprice}}
            {{/if}}
        {{/if}}
        
      {{else}}
        	0.00
      {{/if}}
      
      </td>
      <td >({{$detail.moneytype}}){{$li.originsellprice}}</td>
      <td >{{if $li.stock}}
       {{foreach from=$li.stock item=stock key=key}}
       	{{$stock.storage_name}} &nbsp;&nbsp;&nbsp;库存[{{$stock.stock}}]
        {{if $stock.positions}}
        仓位[{{$stock.positions}}]
        {{/if}}
        <br>
       {{/foreach}}
       {{else}}
       	NULL
       {{/if}}
      </td>
    </tr>
    {{/foreach}}
         
     
    
  </table>
  
    <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
    <thead>
      <tr>
        <td bgcolor="#FFFFFF">
        {{if $detail.order_status==1 || $detail.order_status==2  || $detail.order_status==3 || $detail.order_status==7}}
        <button type="button" onClick="addgoods({{$detail.order_id}})" class="btn btn-primary" > 增加商品 </button>
          <button type="button" onClick="delordersellgoods({{$detail.order_id}})" class="btn btn-primary" > 删除商品 </button>
          {{if $detail.totalgoods>1}} <button type="button" onClick="chatotalgoods({{$detail.order_id}})" class="btn btn-primary" > 拆分订单 </button> {{/if}}
          
        
         <a name="mod"></a>
         {{/if}}
          </td>
          </tr>
        </thead>
      </table>
   
			</div>
  <br>
 {{if $historyorder}}
 <div class="x_content" style="overflow-x:auto;">
<table cellpadding="0" cellspacing="0" border="0" class="stdtable">
<thead>
  <tr>
    <th colspan="7" class="head1">历史订单</th>
  </tr>
</thead>
<tbody >
<thead>
  <tr class="lbbt">
     <td bgcolor="#FEFFF1" >订单编号</td>
    <td  bgcolor="#FEFFF1" >店铺</td>
    <td  bgcolor="#FEFFF1" >状态</td>
    <td  bgcolor="#FEFFF1">买家帐号</td>
    <td  bgcolor="#FEFFF1" >订单金额</td>
    <td  bgcolor="#FEFFF1">货运单号货运方式</td>
 <td  bgcolor="#FEFFF1"  width="25%">邮寄地址</td>
  </tr>
</thead>
{{foreach from=$historyorder item=li key=key}}
<tr>
  <td valign="middle"  style="position:relative;"><a href="/orderlist/editorder?order_id={{$li.order_id}}">{{$li.order_sn}}</a></td>
  <td>{{$li.shopname}}</td>
  <td valign="middle" >{{if $li.order_status==1}}新订单{{/if}}
  {{if $li.order_status==2}}已支付{{/if}}
  {{if $li.order_status==3}}配货中{{/if}}
  {{if $li.order_status==4}}已发货{{/if}}
  {{if $li.order_status==5}}已完成{{/if}}
  {{if $li.order_status==6}}已作废{{/if}}</td>
  <td valign="middle" >{{$li.customerid}}</td>
  <td valign="middle" >{{$li.goods_amount}}</td>
  <td valign="middle" >{{$li.shipping_name}}{{$li.shipping_number}}</td>
  <td valign="middle" >{{$li.country}} {{$li.province}} {{$li.city}} {{$li.address}} {{$li.address2}} {{$li.tel}}</td>
</tr>
{{/foreach}}
</tbody>
</table>
</div>
<br>
{{/if}} 



 
  
</form>
{{if $orderlog}}
 <div class="x_content" style="overflow-x:auto;">
<table cellpadding="0" cellspacing="0" border="0" class="stdtable">
<thead>
  <tr>
    <th colspan="3" class="head1">操作日志</th>
  </tr>
</thead>
<tbody >
<thead>
  <tr class="lbbt">
    <td  bgcolor="#FEFFF1" width="10%">修改时间</td>
    <td  bgcolor="#FEFFF1" width="25%">操作详情</td>
    <td  bgcolor="#FEFFF1" width="25%">操作人员</td>
  </tr>
</thead>
{{foreach from=$orderlog item=li key=key}}
<tr>
  <td valign="middle" bgcolor="#FFFFFF" style="position:relative;">{{$li.updatetime}}</td>
  <td>{{$li.content}}</td>
  <td valign="middle" bgcolor="#FFFFFF">{{$li.createUser}}</td>
</tr>
{{/foreach}}


</tbody>
</table>
</div>
{{/if}} 
</div></div>


<!-- 模态框（Modal）添加商品 -->
<form action="/order/ajaxbutton?op=addgoodsno"   method="post" name="otherform" id="otherform" >
<input type="hidden" name="addgoodsorderID" id="addgoodsorderID">
  <div class="modal fade" id="addattributeform" tabindex="-1" role="dialog" aria-labelledby="returnaddattributeform" aria-hidden="true">
    <div class="modal-dialog" style="width:740px;">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" 
               aria-hidden="true">× </button>
          <h4 class="modal-title" id="returnaddattributeform"> 增加商品 </h4>
          <br>注意请先设定货币：<select name="moneyratelist" id="moneyratelist">
          {{foreach item=li from=$moneyratelist key=key}}
          <option value="{{$li.name}}" {{if $detail.moneytype==$li.name}} selected{{/if}}>{{$li.name}}</option>
          {{/foreach}}
          </select>
        </div>
        <div class="modal-body">
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td>
             商品编号 <input type="text" name="ordergoodsno[1]" id="ordergoodsno" class="width100" onBlur="getstatusgoods(this)" /> 订购数量 <input type="text" name="ordergoodsnoNum[1]" id="ordergoodsnoNum" class="width100" /> 销售金额 <input type="text" name="ordergoodsnoPrice[1]" id="ordergoodsnoPrice" class="width100" /> <a href="javascript:void(0)"  onClick="showaddgoodsSKU('fileinput')" class="btn btn_book"><span>多增加一商品</span></a></td>
            </tr>
            <tbody id="fileinput"></tbody>
          
          </table>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" 
               data-dismiss="modal"> 关闭 </button>
            <button type="button" class="btn btn-primary"  onclick="AWSgoodssubmit('otherform','addattributeform',0)"> 提交 </button>
          </div>
        </div>
        <!-- /.modal-content --> 
      </div>
      <!-- /.modal-dialog --> 
    </div>
  </div>
</form>
<!-- 模态框（Modal）添加商品 -->

<!-- 模态框（Modal）待审核单添加商品信息 -->
<form action="#"   method="post" name="otherform" id="otherform" >
  <div class="modal fade" id="addnewgoodslist" tabindex="-1" role="dialog" aria-labelledby="saddnewgoodslist" aria-hidden="true">
    <div class="modal-dialog" style="width:740px;">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" 
               aria-hidden="true">× </button>
          <h4 class="modal-title" id="saddnewgoodslist"> 添加新的商品 </h4>
          <br>该商品存在同类型商品信息
        </div>
        <div class="modal-body">
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
           
            <tbody id="shownewgoodslist"></tbody>
          
          </table>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" 
               data-dismiss="modal"> 关闭 </button>
         
          </div>
        </div>
        <!-- /.modal-content --> 
      </div>
      <!-- /.modal-dialog --> 
    </div>
  </div>
  </form>

<!-- 模态框（Modal）待审核单添加商品信息 -->

<!-- 模态框（Modal）paypal退款 -->
<form action="#"   method="post" name="otherform" id="otherform" >
  <div class="modal fade" id="addpalpayrefund" tabindex="-1" role="dialog" aria-labelledby="saddpalpayrefund" aria-hidden="true">
    <div class="modal-dialog" style="width:740px;">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" 
               aria-hidden="true">× </button>
          <h4 class="modal-title" id="saddnewgoodslist"> Paypal退款申请 </h4>
          <br>请填写退款金额和退款说明,注意货币单位
        </div>
        <div class="modal-body">
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
           
           <tr><td>订单编号</td><td><input type="text" name="paypal_order_sn"  id="paypal_order_sn" readonly><input type="hidden" name="paypal_order_id"  id="paypal_order_id" readonly></td></tr>
           <tr><td>订单总金额</td><td><input type="text" name="paypal_alloriginsale"  id="paypal_alloriginsale" readonly ></td></tr>
           <tr><td>退款金额 <span id="refund_moneytype"></span></td><td><input type="text" name="refund_money"  id="refund_money" ></td></tr>
           <tr><td>退款理由</td><td><select class="selection" name="refund_reason"  id="refund_reason" >
             <option value="超出买家等待时间">超出买家等待时间</option>
             <option value="尺码不符">尺码不符</option>
             <option value="顾客重新购买">顾客重新购买</option>
             <option value="与描述不符">与描述不符</option>
             <option value="产品损坏">产品损坏</option>
             <option value="停产">停产</option>
             <option value="优惠">优惠</option>
             <option value="丢包">丢包</option>
             <option value="24小时内取消订单">24小时内取消订单</option>
             <option value="漏发">漏发</option>
             <option value="尺寸不正确">尺寸不正确</option>
           </select></td></tr>
             {{if $platformID!=14 && $platformID != 1 && $platformID != 23}}
           <tr><td>对方paypal</td><td><input type="text" name="otherpaypal" placeholder=""  id="otherpaypal" ></td></tr>
           <tr><td>己方paypal</span></td><td><input type="text" name="ourpaypal" placeholder="如不填写将随机选取己方paypal"  id="ourpaypal" ></td></tr>
            {{/if}}
          </table>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" 
               data-dismiss="modal"> 关闭 </button>
         <button type="button" class="btn btn-primary"  onclick="savepayrefund()"> 提交 </button>
          </div>
        </div>
        <!-- /.modal-content --> 
      </div>
      <!-- /.modal-dialog --> 
    </div>
  </div>
  </form>
<!-- 模态框（Modal）paypal退款 -->
</body>
</html>